// #include <opencv2/core.hpp>
// #include <opencv2/videoio.hpp>
// #include <opencv2/highgui.hpp>
// #include <iostream>
// #include <stdio.h>
// using namespace cv;
// using namespace std;

#include "ImageCamera.h"
#include "ImageDirectory.h"
#include "ProcessImageTcpClient.h"
#include "ShowResultUdp.h"


int main(int argc, char** argv)
{
   
    
    ProcessImageBase *imageProcessor = new ProcessImageTcpClient();
    ImageBase *imageSource = new ImageDirectory("hand_img", 416,416);
    ShowResultBase * showResult = new ShowResultUdp();

    Mat image;
    string res;
    imageSource->openDevice();
    while(1){

        if(imageSource->getImage(image) != 0)
            break;
        if(imageProcessor->process(image, res) == -1)
            break;
        showResult->showRes(res);
    }

    delete imageSource;
    delete imageProcessor;
    delete showResult;
    
    return 0;
 }
